package com.lagou.edu.course.api;

import com.lagou.edu.course.api.dto.SectionDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 课程章节fegin
 *
 * @author lm
 * @since 2021/11/1 9:53
 */
@FeignClient(value = "edu-course-boot", path = "/course/section")
public interface SectionRemoteService {
    @GetMapping(value = "/getSectionAndLesson")
    List<SectionDTO> getSectionAndLesson(@RequestParam("courseId") Integer courseId);

    @PostMapping("/saveOrUpdateSection")
    boolean saveOrUpdateSection(@RequestBody SectionDTO sectionDTO);
}
